﻿namespace smp.QueryDb
{
    public interface IQueryPage<TViewModel>
    {
        Query<TViewModel> ForPageSize(int pageSize);
    }

    internal class QueryPage<TViewModel> : IQueryPage<TViewModel>
    {
        private readonly Query<TViewModel> _query;

        internal QueryPage(Query<TViewModel> query)
        {
            _query = query;
        }

        #region Implementation of IQueryPage<TViewModel>

        public Query<TViewModel> ForPageSize(int pageSize)
        {
            _query.Structure.SetPageSize(pageSize);
            return _query;
        }

        #endregion
    }

    
}
